package com.creative.xcx.mapper;

import com.creative.xcx.domain.UserFavorite;
import com.creative.xcx.domain.vo.UserFavoriteVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @description 用户收藏
 * @author ling
 * @date 2025-03-23
 */
@Mapper
public interface UserFavoriteMapper {

    /**
     * 新增
     * @author ling
     * @date 2025/03/23
     **/
    Integer insert(UserFavorite userFavorite);

    /**
     * 刪除
     * @author ling
     * @date 2025/03/23
     **/
    Integer delete(UserFavorite userFavorite);
    /**
     * 批量刪除
     * @author ling
     * @date 2025/03/23
     **/

    Integer deleteBatch(  Long[]  ids);


    /**
     * 更新
     * @author ling
     * @date 2025/03/23
     **/
    Integer update(UserFavorite userFavorite);

    /**
     * 查询 根据主键 id 查询
     * @author ling
     * @date 2025/03/23
     **/
    UserFavorite selectById(Long id);
    /**
     * 查询 分页查询(带条件)
     * @author ling
     * @date 2025/03/23
     **/
    List<UserFavoriteVo> selectUserFavoriteList(UserFavorite userFavorite);

    /**
     * 批量导出
     * @author ling
     * @date 2025/03/23
     **/
    List<UserFavorite> exportBatch(  Long[]  ids);

    List<UserFavorite> selectByUserId(String userId);

    List<UserFavoriteVo> batchGetMaterials(String userId,@Param("list") List<String> materialIds);

    UserFavorite selectByUserIdAndMaterialId(UserFavorite userFavorite);
}
